<?php
session_start();
# 省略了登录校验
$_SESSION['name'] = $_POST['username'];

header('location:test.php');